import request from '@/utils/request'
// -------- 贷款资格 --------
let BASE_ADDRESS = '/tool/loanCondition'

// 分页查询  /tool/loanCondition/list
export const getLoanConditionListApi = () =>{
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
    })
}

// 添加资格 /tool/loanCondition/add
export const getLoanConditionAddApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 修改资格 /tool/loanCondition/edit
export const getLoanConditionEditApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}

// 删除资格 /tool/loanCondition/remove/{id}
export const getLoanConditionRemoveApi = (id) =>{
    return request({
        url: `${BASE_ADDRESS}/remove/${id}`,
        method: "delete",
    })
}

// 修改贷款产品的要求条件 /tool/loan/editCondition
export const editLoanConditionApi = (loanId,data) =>{
    return request({
        url: `tool/loan/editCondition?loanId=${loanId}`,
        method: "put",
        data
    })
}